function toJsp(url) {
	location.href = base.app + url;
}
function goJspLogin() {
	toJsp("/web/denglu.jsp");
}
function g0JspReg() {
	toJsp("/web/reg.jsp")
}

function goJspSystem() {
	toJsp("/web/page/system.jsp")
}
var form = layui.form;
var $ = layui.jquery;
var layer = layui.layer;
var element = layui.element;
var laypage = layui.laypage;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var upload = layui.upload;
function formSubmit(url, submit, dataType, func) {
	form.on(submit, function(data) {
		ajax(url, data.field, dataType, func);
	});
}
function ajax(url, field, dataType, func) {
	$.ajax({
		url : base.app + url,
		data : field,
		dataType : dataType,
		type : 'post',
		success : func
	});
}
function openLayer(url, end) {
	layer.open({
		type : 2,
		area : [ '500px', '500px' ],
		fixed : false,// 不固定
		maxmin : true,
		end : end,
		content : base.app + url
	});
}

function closeThis() {
	var index = parent.layer.getFrameIndex(window.name);
	parent.layer.close(index);
}

function setPageInfo(elem, count, curr, limit, jump) {
	laypage.render({
				elem : elem, // id
				count : count, // 数据总数
				curr : curr, // 当前页
				limit : limit, // 每页显示的条数
				limits : [ 10, 20, 30, 40, 50 ],
				layout : [ 'count', 'prev', 'page', 'next', 'limit', 'refresh',
						'skip' ],
				jump : jump,
		});
}
